package Data::Conveyor::YAML::Active::Payload::Transaction;

# $Id: Transaction.pm 13653 2007-10-22 09:11:20Z gr $

use warnings;
use strict;
use YAML::Active qw/assert_hashref hash_activate/;


our $VERSION = '0.02';


use base 'Class::Scaffold::YAML::Active';


sub yaml_activate {
    my ($self, $phase) = @_;
    assert_hashref($self);
    my $hash = hash_activate($self, $phase);

    my $payload_item = $self->delegate->make_obj('payload_transaction');

    for ($payload_item->transaction) {
        $_->object_type($hash->{object_type});
        $_->command    ($hash->{command});
        $_->type       ($hash->{type}      || $self->delegate->TXT_EXPLICIT );
        $_->status     ($hash->{status}    || $self->delegate->TXS_RUNNING  );
        $_->necessity  ($hash->{necessity} || $self->delegate->TXN_MANDATORY);

        $_->payload_item($hash->{item});
    }

    $payload_item;
}


1;


__END__

{% USE p = PodGenerated %}

=head1 NAME

{% p.package %} - stage-based conveyor-belt-like ticket handling system

=head1 SYNOPSIS

    {% p.package %}->new;

=head1 DESCRIPTION

None yet. This is an early release; fully functional, but undocumented. The
next release will have more documentation.

=head1 METHODS

=over 4

{% p.write_methods %}

=back

{% p.write_inheritance %}

{% PROCESS standard_pod %}

=cut

